#ifdef USE_ETEN_B5_H

#ifdef INCLUDE_CMAP_DATA

static const int g_cmap_eten_b5_h_table[7] = {
 248,  247,  5551,  5550,  13585,  13629,  13641 };

static const pdf_range g_cmap_eten_b5_h_ranges[250] = {
 {32, 126, 1, 13648},
 {41280, 41304, 1, 99},
 {41305, 41308, 1, 13743},
 {41309, 41342, 1, 128},
 {41377, 41461, 1, 162},
 {41462, 41463, 2, 0},
 {41464, 41470, 1, 249},
 {41536, 41598, 1, 256},
 {41633, 41726, 1, 319},
 {41792, 41854, 1, 413},
 {41889, 41915, 1, 476},
 {41917, 41919, 1, 503},
 {42048, 42110, 1, 595},
 {42145, 42238, 1, 658},
 {42304, 42366, 1, 752},
 {42401, 42494, 1, 815},
 {42560, 42622, 1, 909},
 {42657, 42750, 1, 972},
 {42816, 42878, 1, 1066},
 {42913, 43006, 1, 1129},
 {43072, 43134, 1, 1223},
 {43169, 43262, 1, 1286},
 {43328, 43390, 1, 1380},
 {43425, 43518, 1, 1443},
 {43584, 43646, 1, 1537},
 {43681, 43774, 1, 1600},
 {43840, 43902, 1, 1694},
 {43937, 44030, 1, 1757},
 {44096, 44158, 1, 1851},
 {44193, 44285, 1, 1914},
 {44286, 44286, 0, 2431},
 {44352, 44414, 1, 2007},
 {44449, 44542, 1, 2070},
 {44608, 44670, 1, 2164},
 {44705, 44798, 1, 2227},
 {44864, 44926, 1, 2321},
 {44961, 45007, 1, 2384},
 {45008, 45054, 1, 2432},
 {45120, 45182, 1, 2479},
 {45217, 45310, 1, 2542},
 {45376, 45438, 1, 2636},
 {45473, 45566, 1, 2699},
 {45632, 45694, 1, 2793},
 {45729, 45822, 1, 2856},
 {45888, 45950, 1, 2950},
 {45985, 46078, 1, 3013},
 {46144, 46206, 1, 3107},
 {46241, 46334, 1, 3170},
 {46400, 46462, 1, 3264},
 {46497, 46590, 1, 3327},
 {46656, 46718, 1, 3421},
 {46753, 46846, 1, 3484},
 {46912, 46974, 1, 3578},
 {47009, 47102, 1, 3641},
 {47168, 47230, 1, 3735},
 {47265, 47358, 1, 3798},
 {47424, 47486, 1, 3892},
 {47521, 47614, 1, 3955},
 {47680, 47742, 1, 4049},
 {47777, 47870, 1, 4112},
 {47936, 47998, 1, 4206},
 {48033, 48071, 1, 4269},
 {48072, 48126, 1, 4309},
 {48192, 48254, 1, 4364},
 {48289, 48382, 1, 4427},
 {48448, 48510, 1, 4521},
 {48545, 48638, 1, 4584},
 {48704, 48721, 1, 4678},
 {48722, 48722, 0, 4308},
 {48723, 48766, 1, 4696},
 {48801, 48894, 1, 4740},
 {48960, 49022, 1, 4834},
 {49057, 49150, 1, 4897},
 {49216, 49278, 1, 4991},
 {49313, 49406, 1, 5054},
 {49472, 49534, 1, 5148},
 {49569, 49578, 1, 5211},
 {49579, 49662, 1, 5222},
 {49728, 49790, 1, 5306},
 {49825, 49866, 1, 5369},
 {49867, 49867, 0, 5221},
 {49868, 49918, 1, 5411},
 {49984, 50016, 1, 5462},
 {50017, 50046, 1, 5496},
 {50081, 50104, 1, 5526},
 {50105, 50106, 2, 2},
 {50107, 50174, 1, 5552},
 {50240, 50261, 1, 5620},
 {50262, 50262, 0, 5495},
 {50263, 50302, 1, 5642},
 {50337, 50430, 1, 5682},
 {50496, 50558, 1, 5776},
 {50593, 50686, 1, 5839},
 {50752, 50814, 1, 5933},
 {50849, 50878, 1, 506},
 {50879, 50903, 1, 537},
 {50904, 50910, 1, 13747},
 {50911, 50911, 0, 6036},
 {50912, 50942, 1, 13754},
 {51008, 51070, 1, 13785},
 {51105, 51198, 1, 13848},
 {51264, 51326, 1, 13942},
 {51361, 51411, 1, 14005},
 {51520, 51529, 1, 5996},
 {51530, 51530, 0, 628},
 {51531, 51563, 1, 6006},
 {51564, 51582, 1, 6040},
 {51617, 51645, 1, 6059},
 {51646, 51646, 0, 6039},
 {51647, 51692, 1, 6088},
 {51693, 51710, 1, 6135},
 {51776, 51838, 1, 6153},
 {51873, 51958, 1, 6216},
 {51959, 51959, 0, 6134},
 {51960, 51966, 1, 6302},
 {52032, 52094, 1, 6309},
 {52129, 52222, 1, 6372},
 {52288, 52350, 1, 6466},
 {52385, 52478, 1, 6529},
 {52544, 52606, 1, 6623},
 {52641, 52734, 1, 6686},
 {52800, 52862, 1, 6780},
 {52897, 52990, 1, 6843},
 {53056, 53118, 1, 6937},
 {53153, 53246, 1, 7000},
 {53312, 53374, 1, 7094},
 {53409, 53502, 1, 7157},
 {53568, 53630, 1, 7251},
 {53665, 53758, 1, 7314},
 {53824, 53886, 1, 7408},
 {53921, 54014, 1, 7471},
 {54080, 54142, 1, 7565},
 {54177, 54270, 1, 7628},
 {54336, 54398, 1, 7722},
 {54433, 54526, 1, 7785},
 {54592, 54654, 1, 7879},
 {54689, 54782, 1, 7942},
 {54848, 54910, 1, 8036},
 {54945, 54987, 1, 8099},
 {54988, 54988, 0, 8788},
 {54989, 55038, 1, 8143},
 {55104, 55161, 1, 8193},
 {55162, 55162, 0, 8889},
 {55163, 55166, 1, 8251},
 {55201, 55294, 1, 8255},
 {55360, 55422, 1, 8349},
 {55457, 55550, 1, 8412},
 {55616, 55678, 1, 8506},
 {55713, 55806, 1, 8569},
 {55872, 55934, 1, 8663},
 {55969, 56030, 1, 8726},
 {56031, 56031, 0, 8142},
 {56032, 56062, 1, 8789},
 {56128, 56190, 1, 8820},
 {56225, 56230, 1, 8883},
 {56231, 56318, 1, 8890},
 {56384, 56446, 1, 8978},
 {56481, 56574, 1, 9041},
 {56640, 56702, 1, 9135},
 {56737, 56827, 1, 9198},
 {56828, 56828, 0, 9089},
 {56829, 56830, 1, 9289},
 {56896, 56958, 1, 9291},
 {56993, 57086, 1, 9354},
 {57152, 57214, 1, 9448},
 {57249, 57342, 1, 9511},
 {57408, 57470, 1, 9605},
 {57505, 57598, 1, 9668},
 {57664, 57726, 1, 9762},
 {57761, 57854, 1, 9825},
 {57920, 57982, 1, 9919},
 {58017, 58110, 1, 9982},
 {58176, 58238, 1, 10076},
 {58273, 58366, 1, 10139},
 {58432, 58494, 1, 10233},
 {58529, 58622, 1, 10296},
 {58688, 58750, 1, 10390},
 {58785, 58878, 1, 10453},
 {58944, 59006, 1, 10547},
 {59041, 59134, 1, 10610},
 {59200, 59262, 1, 10704},
 {59297, 59390, 1, 10767},
 {59456, 59518, 1, 10861},
 {59553, 59554, 1, 10924},
 {59555, 59646, 1, 10927},
 {59712, 59765, 1, 11019},
 {59766, 59774, 1, 11074},
 {59809, 59902, 1, 11083},
 {59968, 60030, 1, 11177},
 {60065, 60158, 1, 11240},
 {60224, 60250, 1, 11334},
 {60251, 60286, 1, 11362},
 {60321, 60400, 1, 11398},
 {60401, 60401, 0, 10926},
 {60402, 60414, 1, 11478},
 {60480, 60542, 1, 11491},
 {60577, 60637, 1, 11554},
 {60638, 60638, 0, 11073},
 {60639, 60670, 1, 11615},
 {60736, 60798, 1, 11647},
 {60833, 60841, 1, 11710},
 {60842, 60926, 1, 11720},
 {60992, 61054, 1, 11805},
 {61089, 61162, 1, 11868},
 {61163, 61163, 0, 12308},
 {61164, 61182, 1, 11942},
 {61248, 61310, 1, 11961},
 {61345, 61438, 1, 12024},
 {61504, 61525, 1, 12118},
 {61526, 61526, 0, 11719},
 {61527, 61566, 1, 12140},
 {61601, 61642, 1, 12180},
 {61643, 61643, 0, 11361},
 {61644, 61694, 1, 12222},
 {61760, 61794, 1, 12273},
 {61795, 61802, 1, 12309},
 {61803, 61803, 0, 12640},
 {61804, 61822, 1, 12317},
 {61857, 61950, 1, 12336},
 {62016, 62055, 1, 12430},
 {62056, 62056, 0, 12783},
 {62057, 62078, 1, 12470},
 {62113, 62146, 1, 12492},
 {62147, 62206, 1, 12527},
 {62272, 62324, 1, 12587},
 {62325, 62334, 1, 12641},
 {62369, 62462, 1, 12651},
 {62528, 62565, 1, 12745},
 {62566, 62590, 1, 12784},
 {62625, 62644, 1, 12809},
 {62645, 62645, 0, 12526},
 {62646, 62716, 1, 12829},
 {62717, 62718, 1, 12901},
 {62784, 62846, 1, 12903},
 {62881, 62974, 1, 12966},
 {63040, 63074, 1, 13060},
 {63075, 63075, 0, 12900},
 {63076, 63102, 1, 13095},
 {63137, 63230, 1, 13122},
 {63296, 63358, 1, 13216},
 {63393, 63486, 1, 13279},
 {63552, 63614, 1, 13373},
 {63649, 63742, 1, 13436},
 {63808, 63862, 1, 13530},
 {63863, 63870, 1, 13586},
 {63905, 63939, 1, 13594},
 {63940, 63942, 2, 4},
 {63943, 63953, 1, 13630},
 {63954, 63957, 1, 13642},
 {63958, 63998, 1, 14056}
};

static fz_error *new_eten_b5_h(pdf_cmap **out)
{
	fz_error *error;
	pdf_cmap *cmap;
	error = pdf_newcmap(&cmap);
	if (error)
		return error;
	cmap->staticdata = 1;
	cmap->ranges = (pdf_range*)&g_cmap_eten_b5_h_ranges[0];
	cmap->table = (int*)&g_cmap_eten_b5_h_table[0];
	strcpy(cmap->cmapname, "ETen-B5-H");
	strcpy(cmap->usecmapname, "");
	cmap->wmode = 0;
	cmap->ncspace = 2;
	cmap->cspace[0].n = 1;
	cmap->cspace[0].lo[0] = 0;
	cmap->cspace[0].hi[0] = 128;
	cmap->cspace[0].lo[1] = 0;
	cmap->cspace[0].hi[1] = 0;
	cmap->cspace[0].lo[2] = 0;
	cmap->cspace[0].hi[2] = 0;
	cmap->cspace[0].lo[3] = 0;
	cmap->cspace[0].hi[3] = 0;
	cmap->cspace[1].n = 2;
	cmap->cspace[1].lo[0] = 161;
	cmap->cspace[1].hi[0] = 254;
	cmap->cspace[1].lo[1] = 64;
	cmap->cspace[1].hi[1] = 254;
	cmap->cspace[1].lo[2] = 0;
	cmap->cspace[1].hi[2] = 0;
	cmap->cspace[1].lo[3] = 0;
	cmap->cspace[1].hi[3] = 0;
	
	cmap->rlen = 250;
	cmap->rcap = 250;
	cmap->tlen = 7;
	cmap->tcap = 7;
	*out = cmap;

	return fz_okay;
}

#else

	if (!strcmp(name, "ETen-B5-H"))
		return new_eten_b5_h(cmapp);

#endif
#endif
